/* eslint-disable import/no-extraneous-dependencies */
import { createStackNavigator } from 'react-navigation';
import {
  Animated, Easing,
} from 'react-native';
import { StackViewStyleInterpolator } from 'react-navigation-stack';
// import TabsNavigator from './tabs';
import {
  About, Qrcode, MainView, Mine, PasswordReset, AddTaskDevice, TaskDeviceDetail, MyWebView, InOrOutBoundtInfo, ChangePartInfo, AddChangePart,
  AddIncident, submitPage, Info, deviceInfo, deviceInfoPage, incidentSearch, changeParts, SparePartInfo, NewOutBound, ChangePart, AddPosition,
  changePartsConfirm, TechPage, SparePartsInventoryInfo, SparePartsInventoryDetail, Share, SearchSpareParts, changePartsMoreConfirm,
} from '../pages';
import CreatTask from '../pages/pollingRecord/createTask';
import Task from '../pages/pollingRecord/task';
import PollingRecord from '../pages/pollingRecord/index';
import PushList from '../pages/pushList';

const MainNavigator = createStackNavigator(
  {
    MainView: { screen: MainView },
    Mine: { screen: Mine },
    About: { screen: About },
    Share: { screen: Share },
    MyWebView: { screen: MyWebView },
    Qrcode: { screen: Qrcode },
    PasswordReset: { screen: PasswordReset },
    AddIncident: { screen: AddIncident },
    submitPage: { screen: submitPage },
    Info: { screen: Info },
    deviceInfo: { screen: deviceInfo },
    AddPosition: { screen: AddPosition },
    SparePartInfo: { screen: SparePartInfo },
    ChangePartInfo: { screen: ChangePartInfo },
    AddChangePart: { screen: AddChangePart },
    ChangePart: { screen: ChangePart },
    NewOutBound: { screen: NewOutBound },
    InOrOutBoundtInfo: { screen: InOrOutBoundtInfo },
    deviceInfoPage: { screen: deviceInfoPage },
    incidentSearch: { screen: incidentSearch },
    changeParts: { screen: changeParts },
    changePartsConfirm: { screen: changePartsConfirm },
    changePartsMoreConfirm: { screen: changePartsMoreConfirm },
    CreatTask: { screen: CreatTask },
    Task: { screen: Task },
    AddTaskDevice: { screen: AddTaskDevice },
    PollingRecord: { screen: PollingRecord },
    TaskDeviceDetail: { screen: TaskDeviceDetail },
    PushList: { screen: PushList },
    TechPage: { screen: TechPage },
    SparePartsInventoryInfo: { screen: SparePartsInventoryInfo },
    SparePartsInventoryDetail: { screen: SparePartsInventoryDetail },
    SearchSpareParts: { screen: SearchSpareParts },
  },
  {
    initialRouteName: 'MainView',
    headerMode: 'screen',
    transitionConfig: () => ({
      screenInterpolator: StackViewStyleInterpolator.forHorizontal,
      transitionSpec: {
        duration: 200,
        easing: Easing.linear,
        timing: Animated.timing,
      },
    }),
  },
);

export default MainNavigator;
